<style>
table tr td, table tr th {

    width:25%;
}
table tr td:first-child, table tr th:first-child {
    text-align:left;
    padding-left:10px;
    width:25%;
}
h4 {
    margin-bottom:10px;
    margin-top:15px;
}
h4 small {
    font-weight:normal;
}
</style>
<div id="main_content">

<?php foreach($widgets as $contener => $array):?>
    <h4><?=lang('widget_'.$contener)?> <small>[<?=$contener?>]</small></h4>

    <table class="table" cellspacing="0" cellpadding="4" border="0">
        <tr>
            <th><?=lang('widget_field_modul')?> / <?=lang('widget_field_method')?></th>
            <th><?=lang('widget_field_title')?></th>
            <th><?=lang('widget_field_order')?></th>
            <th><?=lang('actions')?></th>
        <tr>
    <?php foreach($array as $row):?>
        <tr>
            <td><?=$row['modul_title'] ?> / <?=$row['widget_title'] ?></td>
            <td><?=$row['title'] ?></td>
            <td><?=$row['order'] ?></td>
            <td>
            <?=modalbox('widgets/edit/'.$row['id'], image('images/icons/gear.png'), lang('change').' - '.$row['modul_title'].' / '.$row['widget_title']);?>
            <?=modalboxquestion ('widgets/del/'.$row['id'], image('images/icons/cross.png'), lang('delete').' - '.$row['title'])?>
            &nbsp;&nbsp;&nbsp;
            <?=modalbox('widgets/visible/'.$row['id'], image('images/icons/documents.png'), lang('change').' - '.$row['title'], '', 300);?>
            </td>
        </tr>
    <?php endforeach;?>
    </table>
<?php endforeach;?>

<?=modalbox('widgets/add', lang('widget_add'), lang('widget_add'), array('class' => 'add'));?>
</div>